package com.feisi.service.impl;

import com.feisi.dao.FocusDao;
import com.feisi.domain.Focus;
import com.feisi.domain.User;
import com.feisi.service.FocusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FocusServiceImpl implements FocusService {

    @Autowired
    private FocusDao focusDao;

    @Override
    public void saveFocus(Focus focus) {
        focusDao.saveFocus(focus);
    }

    @Override
    public void deleteFocus(Focus focus) {
        focusDao.deleteFocus(focus);
    }

    @Override
    public List<User> findByUserid(Integer userid, Integer page, Integer limit) {
        List<User> users = focusDao.findByUserid(userid, page, limit);
        return users;
    }


    @Override
    public Integer FocusTotalByUserid(Integer userid) {
        Integer focusTotalByUserid = focusDao.FocusTotalByUserid(userid);
        return focusTotalByUserid;
    }

    @Override
    public Integer findByUidAndBeid(Focus focus) {
        Integer byUidAndBeid = focusDao.findByUidAndBeid(focus);
        return byUidAndBeid;
    }
}
